package Experiment.Text;

public class Circle extends Graph {
    double radius;
    String form;

    public Circle(double radius, String form) {
        this.radius = radius;
        this.form = form;
    }

    @Override
    public double getPerimeter() {
        double x=3.14;
        return 2*x*radius;
    }

    public String show() {
        double x=3.14;
        double s=x*Math.pow(radius,2);
        return form+"，面积为"+s;
    }
}

